package com.wc.alorithm_luogu.P1259;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * @Author congege
 * @Description 难度较高
 * 黑白棋子的移动
 * https://www.luogu.com.cn/problem/P1259
 * @Date Created in 2023/9/15-15:10
 */
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();
        char o = 'o';
        char x = '*';
        char l = '-';
        char back = '\n';

        StringBuffer curStr = new StringBuffer();

        for (int i = 0; i < n; i++) {
            curStr.append(o);
        }

        for (int i = 0; i < n; i++) {
            curStr.append(x);
        }

        int seat = 2;
        for (int i = 0; i < seat; i++) {
            curStr.append(l);
        }

        Main main = new Main();

        String ans = main.moveChess(curStr, new StringBuffer());
        System.out.println(ans);
    }

    public String moveChess(StringBuffer pre, StringBuffer back) {


        StringBuffer ans = new StringBuffer();
        /**
         * 添加本体
         */
        ans.append(pre);
        ans.append(back);
        ans.append('\n');
        /**
         * 出口函数的当到4个的时候处理
         */
        if (pre.length() == 10) {
            StringBuffer str1 = new StringBuffer("ooo--***o*");
            StringBuffer str2 = new StringBuffer("ooo*o**--*");
            StringBuffer str3 = new StringBuffer("o--*o**oo*");
            StringBuffer str4 = new StringBuffer("o*o*o*--o*");
            StringBuffer str5 = new StringBuffer("--o*o*o*o*");
            ArrayList<StringBuffer> lastStr = new ArrayList<>();
            lastStr.add(str1);
            lastStr.add(str2);
            lastStr.add(str3);
            lastStr.add(str4);
            lastStr.add(str5);

            for (int i = 0; i < lastStr.size(); i++) {
                ans.append(lastStr.get(i));
                ans.append(back);
                ans.append('\n');
            }
            return ans.toString();
        }
        StringBuffer next = new StringBuffer();
        /**
         * 添加下一行
         */
        next.append(pre);
        int last = pre.length();
        int chgIdx = (last - 2) / 2;
        /**
         * 将前面的东西中间的位置替换成“--”
         */
        next.replace(chgIdx - 1, chgIdx + 1, "--");
        /**
         * 删除最后两个位置
         */
        next.delete(last - 2, last);
        /**
         * 再将后买你位置接一个"o*"
         */
        back.append("o*");
        /**
         * 拼接到后面去
         */
        next.append(back);
        next.append('\n');
        ans.append(next);

        /**
         * 处理前缀
         */
        pre.delete(chgIdx - 1, chgIdx + 1);
        /**
         * 处理后缀
         */
        ans.append(moveChess(pre, back));
        return ans.toString();
    }
}
